
F=open('cipher1.txt','r')
l=F.read().split(',')
F.close()

data=[]
for x in l:
    data.append(int(x))

#key='a'

key1='g'
key2='o'
key3='d'

index=0
total=0
for x in data:
    if index%3==0:
        value=ord(key1)^x
    if index%3==1:
        value=ord(key2)^x
    if index%3==2:
        value=ord(key3)^x
    index+=1
    print chr(value)
    total+=value
print total

"""

while key<='z':
    n=0
    m=0
    length=len(data)
    index=2
    while index<length:
        value=ord(key)^data[index]
        if (value>=ord('a') and value<=ord('z'))or (value>=ord('A') and value<=ord('Z')) or value==32 or value==44 or value==46:
            m+=1
        n+=1
        index+=3
    print key,m*1.0/n
    key=chr(ord(key)+1)
"""
